package com.grademaster.mapper;


import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.grademaster.entity.LoginRecords;
import com.grademaster.vo.LoginRecordVO;
import org.apache.ibatis.annotations.Mapper;

import java.util.Date;
import java.util.List;

/**
* @author Administrator
* @description 针对表【login_records(登录记录表)】的数据库操作Mapper
* @createDate 2024-06-25 13:57:04
* @Entity generator.domain.LoginRecords
*/
@Mapper
public interface LoginRecordsMapper extends BaseMapper<LoginRecords> {
    /**
     * 根据条件查询登录记录
     * @param username
     * @param name
     * @param roleName
     * @param startTime
     * @param endTime
     * @param page
     * @param pageSize
     * @return
     */
    List<LoginRecordVO> selectLoginRecordsByConditions(
            String username,
            String name,
            String roleName,
            Date startTime,
            Date endTime,
            int page,
            int pageSize
    );

    /**
     * 根据条件查询登录记录数量
     * @param username
     * @param name
     * @param roleName
     * @param startTime
     * @param endTime
     * @return
     */
    int countLoginRecordsByConditions(
            String username,
            String name,
            String roleName,
            Date startTime,
            Date endTime
    );

}




